﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="invoicequery.aspx.cs" Inherits="member_invoicequery" %>

	<link rel="stylesheet" href="/Public/Home/chosen_v1.5.1/chosen.css" />
	<link rel="stylesheet" href="/Public/Home/css/colorbox.css" />
	<style type="text/css">
		<!--
		.QiyeC a{border:1px solid #d2ccc4;color:#666;padding: 3px 10px;display:inline-block;margin:5px 0;}
		#delImage{display: block; position: absolute;bottom:5px;right:5px;background:#e95515;border:none;color:#FFF;overflow:visible;padding:5px 10px;cursor:pointer;}
		.alert-warning{
			position:relative;
			margin:0 30px 15px;
			padding:25px;
			color:#a94442;
			background-color:#f2dede;
			border:1px solid #ebccd1;
			border-radius:4px;
		}
		.alert-warning .close{
			position:absolute;
			top:25px;
			right:25px;
		}
		-->
	</style>
	<div class="Member_content">
		<h1 class="member_iconTit">
			电子发票管理 <asp:Literal ID="Literal1" runat="server"></asp:Literal>
		</h1>
        <form id="from1" runat="server">
				<div class="msearch" style="height:100px;">                    
        	<span class="s1">
				<b>订单单据号</b>
                <asp:TextBox ID="dd" runat="server" Width="120px" placeholder="请输入订单单据号"></asp:TextBox>
			</span>
            <span class="s1">
				<b>出库单据号</b>
                <asp:TextBox ID="ckd" runat="server" Width="120px" placeholder="请输入出库单据号"></asp:TextBox>
			</span>
			<span class="s1">
				<b>单位名称</b>
                <asp:TextBox ID="dwmc" runat="server" Width="220px" placeholder="请输入供应商名称"></asp:TextBox>
			</span>

				<div style="width:100%;float:left;padding:8px 0;margin:0;height:0;"></div>
           <span class="s1">
				<b>开票时间</b>				
                <asp:TextBox ID="srq" runat="server" style="width:74px;" onClick="WdatePicker({ minDate: #F{$dp.$D(\'d4312\')}', maxDate: '%y-%M-%d' });" placeholder="入库时间"></asp:TextBox>
				<span style="line-height:30px;margin:0;"> - </span>				
                <asp:TextBox ID="erq" runat="server" style="width:74px;" onClick="WdatePicker({ minDate: '#F{$dp.$D(\'d4312\')}', maxDate: '%y-%M-%d' });" placeholder="入库时间"></asp:TextBox>
			</span>
                    <asp:Button ID="Button1" runat="server" CssClass="msbut submit-search" Text="搜  索" OnClick="Button1_Click" /> 	
			<div style="width:100%;float:left;padding:8px 0;margin:0;height:0;"></div>
		</div>
		<div class="mbig">
            <asp:literal ID="ResultDeBug" runat="server"></asp:literal>
                          <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" GridLines="None" Width="100%" CellPadding="0" PageSize="15" CssClass="sebig" AllowPaging="true"  onpageindexchanging="GridView1_PageIndexChanging" >
                        <Columns>
                          <asp:TemplateField>
                             <HeaderTemplate>
						    <input class="check_all" type="checkbox">全选</label>
                          </HeaderTemplate>
                             <ItemTemplate>
                                <label class="searxh-content-label"><input type="checkbox" name="ids" value="<%# Eval("djbh") %>" /></label>
                             </ItemTemplate>
                          </asp:TemplateField>                          
                            <asp:BoundField DataField="company" HeaderText="单位名称" HeaderStyle-Width="25%" />   
                            <asp:BoundField DataField="djbh" HeaderText="出库单号" ReadOnly="True" HeaderStyle-Width="10%" />
                            <asp:BoundField DataField="ddh" HeaderText="订单号" HeaderStyle-Width="10%" />
                            <asp:BoundField DataField="FP_DM" HeaderText="发票代码" HeaderStyle-Width="8%" />
                            <asp:BoundField DataField="FP_HM" HeaderText="发票号" HeaderStyle-Width="7%" />
                            <asp:BoundField DataField="KPRQ" HeaderText="开票日期" HeaderStyle-Width="10%" />
                            <asp:BoundField DataField="KPHJJE" HeaderText="金额" HeaderStyle-Width="10%" />                                                     
                            <asp:HyperLinkField HeaderText="下载" Text="下载"  DataNavigateUrlFields="PDF_URL" DataNavigateUrlFormatString="{0}" target= "_blank" HeaderStyle-Width="10%"/>
                           
                        </Columns>
                        <RowStyle CssClass="searli" />
                        <HeaderStyle CssClass="setit" />
                    <PagerTemplate>
                        <div class="bot">
				        <h1 class="fl s2">&nbsp;</h1>
	        <ul class="fr s2"><li class="pageList"><asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev"
                                        CommandName="Page" Visible='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'>上一页</asp:LinkButton> 
                <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page"
                                        Visible='<%#((GridView)Container.NamingContainer).PageIndex != 0 %>'>首页</asp:LinkButton>                 
                <asp:TextBox ID="TextBox1" runat="server" Width="20px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>' style="float:left;width:40px;height:30px;line-height:30px;border:1px solid #e5e5e5;text-align:center;margin:0 -1px 0 3px;" />
                <input type="submit" style="height:32px;line-height:32px;float:left;width:40px;" value="跳转" /> 
                <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="Last" CommandName="Page"
                                        Visible='<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>'>尾页</asp:LinkButton> 
                <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page"
                                        Visible='<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>'>下一页</asp:LinkButton> 
                <a href="javascript:;">共 <%# ((GridView)Container.NamingContainer).Rows.Count%> 条记录，
                    第 <asp:Literal ID="LabelCurrentPage" runat="server" Text="<%# ((GridView)Container.NamingContainer).PageIndex + 1 %>"></asp:Literal>/<asp:Literal ID="LabelPageCount" runat="server" Text="<%# ((GridView)Container.NamingContainer).PageCount%>"></asp:Literal> 页</a></li></ul>
	    </div>
            </PagerTemplate>
                    </asp:GridView>
					</div>
        </form>
	</div>
	<script src="/Public/Home/chosen_v1.5.1/chosen.jquery.js" type="text/javascript"></script>
	<script src="/Public/Home/js/jquery.colorbox.js" type="text/javascript"></script>
	<script src="/Public/Home/js/e-smart-zoom-jquery.min.js" type="text/javascript"></script>

	<script src="/Public/Home/js/jqueryui.js" type="text/javascript"></script>
	<script src="/Public/Home/js/jquery.iviewer.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="/Public/Home/js/My97DatePicker/WdatePicker.js"></script>

	<script type="text/javascript">
	    $(function () {
	        $('#search-from').keyup(function (event) {
	            if (event.keyCode == 13) {
	                $('#export').val('0');
	                $('#search-from').submit();
	            }
	        }).on('click', '.submit-search', function () {
	            $('#export').val($(this).attr('data-type'));
	            $('#search-from').submit();
	        }).on('click', '.submit-search', function () {
	            $('#export').val($(this).attr('data-type'));
	            $('#search-from').submit();
	        });
	        $('select').chosen({ disable_search: true, width: '132px' });
	        $('.view').colorbox({ width: '80%', height: '100%', current: "{current}/{total}" });
	        $(document).bind('cbox_complete', function () {
	            var image_id = $.colorbox.element().attr('rel');
	            var image_url = $.colorbox.element().attr('href');
	            var data_dap = $.colorbox.element().attr('data-dap');
	            var data_img = $.colorbox.element().attr('data-img');
	            $("#cboxLoadedContent").iviewer({
	                src: image_url, onFinishLoad: function () {
	                    $(this).append('<div class="iviewer_common iviewer_button btn-image-delete"  data_img="' + data_img + '" data-id="' + image_id + '" data-dap="' + data_dap + '" data-url="' + image_url + '">删除该张报告</div>');
	                }
	            }).find('img.cboxPhoto').remove();
	        });
	        $(".check_all").click(function () {
	            $(this).closest('table').find(".check_all").prop("checked", $(this).prop("checked"));
	            $(this).closest('table').find(":checkbox[name='ids']").prop("checked", $(this).prop("checked"));
	        });
	    });
	</script>
<script type="text/javascript">
    $(document).ready(window.onresize = function () {
        //var whe = $(window).height();
        //$(".Member_left").css("height",whe-72);
        $('body').on('click', '.ajax-url', function () {
            var msg = '确定要执行该操作吗？';
            var url = $(this).attr('href');
            if ($(this).attr('data-msg')) {
                msg = $(this).attr('data-msg');
            }
            $.dialog.confirm(msg, function () {
                $.ajax({
                    url: url,
                    type: "post",
                    data: {},
                    dataType: 'json',
                    success: function (data) {
                        if (data.code == 1) {
                            $.dialog.tips(data.msg ? data.msg : '操作成功', 2, 'success.gif', function () {
                                window.location.reload();
                            });
                        } else {
                            $.dialog.tips(data.msg ? data.msg : '抱歉，系统错误，请稍后再试！', 2, 'error.gif');
                        }
                    },
                    error: function () {
                        $.dialog.tips('抱歉，系统错误，请稍后再试！', 2, 'error.gif');
                    }
                });
            });
            return false;
        });
        $('.logout').on('click', function () {
            var href = $(this).attr('href');
            $.dialog.confirm('您确定要退出登录吗？', function () {
                window.location.href = href;
            });
            return false;
        });
        if (!('placeholder' in document.createElement('input'))) {
            $('input[placeholder],textarea[placeholder]').each(function () {
                var that = $(this),
                text = that.attr('placeholder');
                if (that.val() === "") {
                    that.val(text).addClass('placeholder');
                }
                that.focus(function () {
                    if (that.val() === text) {
                        that.val("").removeClass('placeholder');
                    }
                })
                .blur(function () {
                    if (that.val() === "") {
                        that.val(text).addClass('placeholder');
                    }
                })
                .closest('form').submit(function () {
                    if (that.val() === text) {
                        that.val('');
                    }
                });
            });
        }
    });
</script>
</body>
</html>
